#include <fermat/common/format.h>
#include <fermat/benchmark/fermat_benchmark.h>
#include <stdio.h>
#include <sstream>
#include <string>
static const std::string c(1024,'a');
BENCHMARK(common, format, 10, 1000)
{
  fermat::MemoryWriter out;
  out<<42<<38<<c;
}


BENCHMARK(common, format_sprintf, 10, 1000)
{
    char buff[2024];
    sprintf(buff, "%d%d%s" ,42,38, c.c_str());
}

BENCHMARK(common, format_ostringstream, 10, 1000)
{
    std::ostringstream out;
    out<<42<<38<<c;
}


